#pragma once
#include "log/configurable.hpp"
#include "thread/atomiccounter.hpp"
using namespace JHCPP::thread;
#include "stdlib/exception.hpp"
using namespace JHCPP::stdlib::jhException;

namespace JHCPP
{
	namespace log
	{
		class CMessage;
		class CChannel : public CConfigurable, public CRefCountedObject
		{
		public:
			CChannel()
			{

			}

			virtual void open()
			{

			}


			virtual void close()
			{

			}


			virtual void log(const CMessage& msg) = 0;

			void setProperty(const std::string& name, const std::string& value)
			{
				throw PropertyNotSupportedException(name);
			}

			std::string getProperty(const std::string& name) const
			{
				throw PropertyNotSupportedException(name);
			}

		protected:
			virtual ~CChannel()
			{

			}

		private:
			CChannel(const CChannel&);
			CChannel& operator = (const CChannel&);
		};
	}//end of namespace log
}//end of namespace JHCPP
